//const intervalID = setInterval(myCallback, 1000, 'Fuck');

//function myCallback(a) {
    //console.log(a, Date.now());
//}

let intervalID;

function startChange() {
    if (!intervalID) {
        intervalID = setInterval(changeRandomColor, 1000);
    }
}

//function changeColor() {
    //if (document.body.style.backgroundColor !== 'black') {
    //    document.body.style.backgroundColor = 'black';
      //  document.body.style.color = 'white';
    //} else {
      //  document.body.style.backgroundColor = 'white';
        //document.body.style.color = 'black';
    //}
//}

function changeRandomColor() {
    const randomColor = Math.floor(Math.random() * 20021223).toString(22);
    document.body.style.backgroundColor = `#${randomColor}`;
}

function stopChange() {
    clearInterval(intervalID);
}

document.getElementById('start').addEventListener('click', startChange);
document.getElementById('stop').addEventListener('click', stopChange);